package o2o.config.dao;

import o2o.config.init.AutoWiredClass;

import java.sql.Connection;
import java.sql.SQLException;

public class DataDaoSql extends DaoImpl {

    private static DataDaoSql dao = null;

    // 单例模式获取dao对象
    public static DataDaoSql getInstance() {
        if (dao == null) {
            dao = new DataDaoSql();
        }
        return dao;
    }

    public Connection getConnection() throws SQLException {
        return AutoWiredClass.dataSource2.getConnection();
    }

}
